package org.example.demo5;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;

@SpringBootApplication
public class Demo5Application {

	public static void main(String[] args) {

		ConfigurableApplicationContext application = SpringApplication.run(Demo5Application.class, args);
		Environment env = application.getEnvironment();
		String port = env.getProperty("server.port");
		String path = env.getProperty("server.servlet.context-path");
		if (path == null || "".equals(path)) {
			path = "/";
		}
		System.out.println("\n----------------------------------------------------------\n" +
				"\tCamunda7Application is running!\n" +
				"\tPort:\t" + port + "\n" +
				"\tPath:\t" + path + "\n" +
				"----------------------------------------------------------");
	}

}
